import request from '@/utils/request'

//小节模块
export default {
  //添加小节
  add(video) {
    return request({
      url: `/eduservice/video/add`,
      method: 'post',
      data:video
    })
  },
  //删除小节
  deleteById(id){
    return request({
      url: `/eduservice/video/deleteById/${id}`,
      method: 'get'
    })
  },
  //修改小节
  update(video) {
    return request({
      url: `/eduservice/video/update`,
      method: 'post',
      data:video
    })
  },
  //根据id查询小节
  findById(id){
    return request({
      url: `/eduservice/video/findById/${id}`,
      method: 'get'
    })
  },
  //删除小节的视频信息
  deleteVideo(videoId){
    return request({
      url: `/vod/delete/${videoId}`,
      method: 'get'
    })
  }
}
